# @Create  : 2021/12/29 10:57
# @Author  : great
# @Remark  : 动环管理View层
from mxsoftpy import Module

iot_module = Module('iot_device_module', url_prefix='')
# # 烟感接口
# from view.common.IOTManager.GasDetector.gas_detector import (GASADeviceSelectView, GASDeviceListView,
#                                                              GASDeviceRetrieveView)
#
# iot_module.add_resource(GASADeviceSelectView, "/gas_detector/device_select.sy")
# iot_module.add_resource(GASDeviceListView, "/gas_detector/device_list.sy")
# iot_module.add_resource(GASDeviceRetrieveView, "/gas_detector/device_retrieve.sy")
#
# from view.common.IOTManager.PowerCabinet.power_cabinet import (PowerDeviceSelectView, PowerDeviceListView,
#                                                                PowerDeviceRetrieveView)
#
# # 配电柜
# iot_module.add_resource(PowerDeviceSelectView, "/power_cabinet/device_select.sy")
# iot_module.add_resource(PowerDeviceListView, "/power_cabinet/device_list.sy")
# iot_module.add_resource(PowerDeviceRetrieveView, "/power_cabinet/device_retrieve.sy")
# # 水浸接口
#
# from view.common.IOTManager.Water.water import (WaterDevicesRead,
#                                                 WaterCheckRead,
#                                                 WaterDataRead)
#
# iot_module.add_resource(WaterCheckRead, '/water_check_read.sy')
# iot_module.add_resource(WaterDevicesRead, '/water_dev_read.sy')
# iot_module.add_resource(WaterDataRead, '/water_data_read.sy')
#
# # 温湿度接口
# from view.common.IOTManager.TemHumidity.humidity import (TemHumidityCheckRead,
#                                                          TemHumidityDevicesRead,
#                                                          TemHumidityDataRead)
#
# iot_module.add_resource(TemHumidityCheckRead, '/humidity_check_read.sy')
# iot_module.add_resource(TemHumidityDevicesRead, '/humidity_dev_read.sy')
# iot_module.add_resource(TemHumidityDataRead, '/humidity_data_read.sy')
#
# from view.common.IOTManager.AirConditioner.modbus_ac import (ACSelectView, ACUpdateView, ACSetView, ACRetrieveView,
#                                                              ACHintView)
#
# # 普通空调
# iot_module.add_resource(ACSelectView, '/modbus_ac/ac_select.sy')
# iot_module.add_resource(ACUpdateView, '/modbus_ac/ac_update.sy')
# iot_module.add_resource(ACSetView, '/modbus_ac/ac_set.sy')
# iot_module.add_resource(ACRetrieveView, '/modbus_ac/ac_retrieve.sy')
# iot_module.add_resource(ACHintView, '/modbus_ac/ac_hint.sy')
#
# from view.common.IOTManager.UpsDevice.dev_select import (UPSSelectView, UPSListView, UPSRetrieveView, UPSTrendView)
#
# # ups 设备
# iot_module.add_resource(UPSSelectView, '/ups_device/ups_select.sy')
# iot_module.add_resource(UPSListView, '/ups_device/ups_list.sy')
# iot_module.add_resource(UPSRetrieveView, '/ups_device/ups_retrieve.sy')
# iot_module.add_resource(UPSTrendView, '/ups_device/ups_trend.sy')
#
# from view.common.IOTManager.AirConditioner.air_conditioner import (ACSelectView, ACListView, ACRetrieveView)
#
# # 精密空调
# iot_module.add_resource(ACSelectView, "/air_conditioner/ac_select.sy")
# iot_module.add_resource(ACListView, "/air_conditioner/ac_list.sy")
# iot_module.add_resource(ACRetrieveView, "/air_conditioner/ac_retrieve.sy")

from view.common.IOTManager.Janitor.public_interface import (DataOriginConfig, RecordAndPersonnel, InsertDoor,
                                                             InsertRecord, InsertPersonnel, BatchNewRecord,
                                                             ExportReport, GetPersonnel)
from view.common.IOTManager.Janitor.data_origin import (DataOriginModel, DataOrigin, UpdateOrigin, MultipleOpen,
                                                        GetConfigField)
from view.common.IOTManager.Janitor.personnel import Personnel
from view.common.IOTManager.Janitor.record import Record
from view.common.IOTManager.Janitor.door import Door, GetDoor

# 门禁接口
# 公共接口
iot_module.add_resource(DataOriginConfig, "/janitor/public/data/origin.sy")
iot_module.add_resource(RecordAndPersonnel, "/janitor/public/add/record/personnel.sy")
iot_module.add_resource(InsertDoor, "/janitor/public/add/door.sy")
iot_module.add_resource(InsertRecord, "/janitor/public/add/record.sy")
iot_module.add_resource(InsertPersonnel, "/janitor/public/add/personnel.sy")
iot_module.add_resource(BatchNewRecord, "/janitor/public/add/records.sy")
iot_module.add_resource(ExportReport, "/janitor/public/report.sy")
# 数据源接口
iot_module.add_resource(DataOriginModel, "/janitor/origin/model.sy")
iot_module.add_resource(DataOrigin, "/janitor/origin/data.sy")
iot_module.add_resource(Door, "/janitor/origin/door.sy")
iot_module.add_resource(UpdateOrigin, "/janitor/origin/update.sy")
iot_module.add_resource(MultipleOpen, "/janitor/origin/multiple.sy")
iot_module.add_resource(GetDoor, "/janitor/origin/door/info.sy")
iot_module.add_resource(GetConfigField, "/janitor/origin/config/field.sy")
iot_module.add_resource(GetPersonnel, "/janitor/origin/personnel.sy")
# 人员的接口
iot_module.add_resource(Personnel, "/janitor/personnel/data.sy")
# 记录的接口
iot_module.add_resource(Record, "/janitor/record/data.sy")

# from view.common.IOTManager.Public.public import IOTAllDeviceView
#
# iot_module.add_resource(IOTAllDeviceView, "/IOT/element/iot_all_list.sy")
